import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    base: '/anylink_manage/',
    mode: 'history',
    routes: [
        {
            path: '/',
            redirect: '/audit'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/audit',
                    component: () => import(/* webpackChunkName: "audit" */ '../components/page/audit.vue'),
                    meta: { title: '审核管理' }
                },
                {
                    path: '/history',
                    component: () => import(/* webpackChunkName: "history" */ '../components/page/history.vue'),
                    meta: { title: '审核历史' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
